function e() {
    return new Promise(function(resolve, s) {
        null != systemInfoCache ? resolve(systemInfoCache) : wx.getSystemInfo({
            success: function(systemInfo) {
                var model = systemInfo.model, screenHeight = systemInfo.screenHeight, statusBarHeight = systemInfo.statusBarHeight, isIPhoneX = /iphone x/i.test(model), isIPhone11 = /iPhone11/i.test(model) && 812 === screenHeight;
                resolve(systemInfoCache = {
                    isIPhoneX: isIPhoneX || isIPhone11,
                    statusBarHeight: statusBarHeight
                });
            },
            fail: s
        });
    });
}

Object.defineProperty(exports, "__esModule", {
    value: !0
});

var systemInfoCache = null;

exports.safeArea = function() {
    var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, s = t.safeAreaInsetBottom, n = void 0 === s || s, o = t.safeAreaInsetTop;
    return Behavior({
        properties: {
            safeAreaInsetTop: {
                type: Boolean,
                value: void 0 !== o && o
            },
            safeAreaInsetBottom: {
                type: Boolean,
                value: n
            }
        },
        created: function() {
            var t = this;
            e().then(function(e) {
                var s = e.isIPhoneX, n = e.statusBarHeight;
                t.set({
                    isIPhoneX: s,
                    statusBarHeight: n
                });
            });
        }
    });
};